package com.dlnu.sujiwords.domain.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class User {
    /*用户id*/
    private Integer user_id;
    /*用户名称*/
    private String user_name;
    /*电话号码*/
    private String phone_number;
    /*密码*/
    private String password;
    /*学习词本1.school(中小学词本)2.postgraduata_word(考研词本)3.high_school(高中词本)4.cet_6(六级词本)5.cet_4(四级词本)*/
    private byte Learn_vocabulary;
    /*角色*/
    private byte role;
    /*在线状态*/
    private byte online;


    public User(String user_name, String phone_number, String password, byte role) {
        this.user_name = user_name;
        this.phone_number = phone_number;
        this.password = password;
        this.role = role;
    }

    public User(String user_name, String phone_number, String password) {
        this.user_name = user_name;
        this.phone_number = phone_number;
        this.password = password;
    }

    public User(String phone_number, String password) {
        this.phone_number = phone_number;
        this.password = password;
    }

    public User(String phone_number, String password, byte role) {
        this.phone_number = phone_number;
        this.password = password;
        this.role = role;
    }

    public boolean passwordEqual(String subPassword){
        return password.equals(subPassword);
    }

}
